package com.boco.blch.analysiser.compliance.HW.manager;

import com.boco.blch.analysiser.compliance.ComplianceResolved;

public class BOCO_Spark_VersionManage_CycleUpdate implements ComplianceResolved{

	@Override
	public int realEchoResolved(String echoResult) {
		String str=echoResult.replaceAll(" ", "");
		String newVersion="2.2.0";
		String[] echoResult1=str.split("\n");
		if(str!=null&&str.trim().length()>0){
			String value="";
			for(int i=0;i<echoResult1.length;i++){
				if(echoResult1[i].contains("spark-om")){
					value=echoResult1[i];
					break;
				}
			}
			String[] values=value.split("-");
			if(values[values.length-1].contains(newVersion)){
				return SUCCESS;
			}
		}
		return FAILED;
	}

	

}
